package com.qfedu.entity.course08;

public class RBTreeNode {
    public int value;
    public boolean isRed;
    public RBTreeNode left;
    public RBTreeNode right;
    public RBTreeNode parent;

    public RBTreeNode(int value) {
        this(value, true);
    }

    public RBTreeNode(int value, boolean isRed) {
        this.value = value;
        this.isRed = isRed;
    }

    public boolean isRed() {
        return isRed;
    }

    public boolean isBlack() {
        return !isRed;
    }
}